<?php

$baseDir = dirname(dirname(dirname(__FILE__)));

set_include_path(
get_include_path().
PATH_SEPARATOR.$baseDir.'/library/spica'
);

include_once 'core/net/HttpClient.php';

$url = 'http://media.imuzik.com.vn//Resources/Data/MusicOnline/Singers/Images/CasiVietNam/Xu%C3%A2n_Hi%E1%BA%BFu.jpg';
$req = new SpicaHttpRequest();
$req->setUrl($url);
$req->setHeaders(array(
 'Content-Type: text/html; charset=UTF-8',
));

$client   = new SpicaHttpClient();
$response = $client->sendRequest($req);
var_dump($response->getHttpCode());
var_dump($response->getSentHttpHeaders());
var_dump($response->getUrl());
var_dump($response->getBody());

?>